package com.tensquare.recruit.dao;

import com.tensquare.recruit.pojo.Recruit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface RecruitDao extends JpaRepository<Recruit,String>, JpaSpecificationExecutor<Recruit> {
    //1.查询推荐的招聘信息（前3条）
    List<Recruit> findTop3ByStateOrderByCreatetimeDesc(String state);
    //2.查询最新的招聘信息（前3条）
    List<Recruit> findTop3ByStateNotOrderByCreatetimeDesc(String state);
}
